<?php
$row = $this->request->data;
?>

<div class="row-fluid">
    <div class="span2">
        <div>
            <p class="nav-header">Actions</p>
            <ul class="nav nav-tabs nav-stacked">                
                <li><a href="<?php echo $this->Html->url('index/'); ?>">List Pages</a></li>
            </ul>
        </div>
    </div>
    <div class="span10">
        <form action="<?php echo $this->Html->url('edit/' . $row['Cmspages']['id']); ?>" class="well" id="PagesyEditForm" method="post" accept-charset="utf-8">
            <div style="display:none;">
                <input type="hidden" name="_method" value="PUT">
            </div>        
            <fieldset>
                <legend>Edit Page</legend>
                <input type="hidden" name="id" help="" value="<?php echo $row['Cmspages']['id']; ?>" id="UserId">

                <div class="control-group required">
                    <label for="Key">Key</label>
                    <input name="key" help="" readonly="readonly" maxlength="45" type="text" value="<?php echo $row['Cmspages']['key']; ?>" id="Key" required="required">
                </div>

                <div class="control-group required">
                    <label for="Title">Title</label>
                    <input name="title" help="" maxlength="255" type="text" value="<?php echo $row['Cmspages']['title']; ?>" id="Title" required="required">
                </div>  

                <div class="control-group required">
                    <label for="Content">Content</label>
                    <textarea name="content" help="" type="text"id="Content"><?php echo $row['Cmspages']['content']; ?></textarea>
                    <script>
                        // Replace the <textarea id="editor1"> with a CKEditor
                        // instance, using default configuration.
                        CKEDITOR.replace('content');
                    </script>
                </div>                  

            </fieldset>        
            <div class="submit">
                <input class="btn btn-primary" type="submit" value="Save">
            </div>
        </form>    
    </div>
</div>